home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Command.h
-
- Contains: Link command Classes Definition
-
- Written by: Mike Halpin
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef _LINKCOMMANDS_
- #define _LINKCOMMANDS_
-
- // -- DrawEditor Includes --
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- #ifndef _DRAWEDITORCONSTANTS_
- #include "DrawEditorConstants.h"
- #endif
-
- #ifndef _COMMAND_
- #include "Command.h"
- #endif
-
- //=============================================================================
- // Forward Declarations
- //=============================================================================
- class DrawEditor;
- class CShape;
- class ODFacet;
- class CSelection;
- class COrderedList;
- class ODDragItemIterator;
- class CSubscribeLink;
- class CPublishLink;
- class ODStorageUnit;
-
- //=============================================================================
- // CPasteLinkCommand
- //=============================================================================
-
- class CPasteLinkCommand : public CCommand
- {
- public:
- CPasteLinkCommand( DrawEditor* theEditor,
- CSelection* selection,
- ODStorageUnit* contentSU,
- ODPasteAsResult& paResult,
- ODBoolean defaultIsMerge);
- virtual ~CPasteLinkCommand();
-
- virtual void Commit(Environment* ev, ODDoneState state);
- virtual void DoCommand(Environment* ev);
- virtual void RedoCommand(Environment* ev);
- virtual void UndoCommand(Environment* ev);
-
- virtual void SetUpdateParameters();
- virtual void CompleteLink(Environment* ev);
- virtual void AbortLink(Environment* ev);
-
-
-
- private:
- CSelection* fSelection; // The actual selection
- ODPasteAsResult fPaResult;
- ODBoolean fDefaultIsMerge;
- ODBoolean fForceEmbed;
- ODStorageUnit* fContentSU;
-
- protected:
- CSubscribeLink* fSubscribeLink;
- };
-
- //=============================================================================
- // CDropLinkCommand
- //=============================================================================
-
- class CDropLinkCommand : public CPasteLinkCommand
- {
- public:
- CDropLinkCommand( DrawEditor* theEditor,
- CSelection* selection,
- ODStorageUnit* dropSU,
- ODPoint dropPoint,
- ODPasteAsResult& paResult,
- ODBoolean defaultIsMerge);
- virtual ~CDropLinkCommand();
-
- virtual void SetUpdateParameters();
- virtual void CompleteLink(Environment* ev);
- virtual void AbortLink(Environment* ev);
-
- private:
- ODPoint fDropPoint;
-
- };
-
-
- //=============================================================================
- // CBreakLinkCommand
- //=============================================================================
-
- class CBreakLinkCommand : public CCommand
- {
- public:
- CBreakLinkCommand(DrawEditor* theEditor, CSubscribeLink* link);
- virtual ~CBreakLinkCommand();
-
- virtual void Commit(Environment* ev, ODDoneState state);
- virtual void DoCommand(Environment* ev);
- virtual void RedoCommand(Environment* ev);
- virtual void UndoCommand(Environment* ev);
-
- private:
- CSubscribeLink* fSubscribeLink;
- };
-
-
- //=============================================================================
- // CBreakLinkSourceCommand
- //=============================================================================
-
- class CBreakLinkSourceCommand : public CCommand
- {
- public:
- CBreakLinkSourceCommand(DrawEditor* theEditor, CPublishLink* link);
- virtual ~CBreakLinkSourceCommand();
-
- virtual void Commit(Environment* ev, ODDoneState state);
- virtual void DoCommand(Environment* ev);
- virtual void RedoCommand(Environment* ev);
- virtual void UndoCommand(Environment* ev);
-
- private:
- CPublishLink* fPublishLink;
- ODBoolean fHadCommandOutstanding;
- };
-
-
- //=============================================================================
- // CCreateLinkCommand
- //=============================================================================
-
- class CCreateLinkCommand : public CCommand
- {
- public:
- CCreateLinkCommand(DrawEditor* theEditor, CPublishLink* link);
- virtual ~CCreateLinkCommand();
-
- virtual void Commit(Environment* ev, ODDoneState state);
- virtual void DoCommand(Environment* ev);
- virtual void RedoCommand(Environment* ev);
- virtual void UndoCommand(Environment* ev);
-
- private:
- CPublishLink* fPublishLink;
- };
-
-
-
- #endif